TESTS=	c_mstore
EXTRA=	/usr/lib/x86_64-linux-gnu/libcheck.a \
	../libmstore.a \
	../libutil.a -lm -lrt -lpthread -lcrypto \

CSRC=	c_mstore.c

ifndef ROOTDIR
	ROOTDIR	= ../
endif

ifndef CFLAGS
	CC	= clang
	CFLAGS	= -O0 -D_FILE_OFFSET_BITS=64 -Wall -Werror -g -I ../include # Assuming your working in this dir
endif

COBJ=	$(CSRC:.c=.o)

.PHONY: all clean

all: $(TESTS)
	@for test in $(TESTS); do	\
		$(ROOTDIR)/check/$$test;\
	done

c_mstore: c_mstore.c
	$(CC) $(CFLAGS) -o c_mstore c_mstore.c ../libmstore/*.o $(EXTRA)

clean:
	rm -f *.a
	rm -f *.o
	rm -f $(TESTS)
